home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
CUJ9208.ARJ
/
1008012B
< prev
next >
Wrap
Text File
|
1992-06-12
|
339b
|
19 lines
Listing 2 -- atexit.c
/* atexit function */
#include <stdlib.h>
/* external declarations */
extern void (*_Atfuns[])(void);
extern size_t _Atcount;
int (atexit)(void (*func)(void))
{ /* function to call at exit */
if (_Atcount == 0)
return (-1); /* list is full */
_Atfuns[--_Atcount] = func;
return (0);
}